package org.mech.sefer.client.ui.event;

import java.util.List;

import org.mech.sefer.event.DataEvent;
import org.mech.sefer.event.Event;
import org.mech.sefer.event.Handler;
import org.mech.sefer.model.bible.TBible;

public class BibleEvents {

	public interface BibleRequestHandler extends Handler {
		void onBibleRequestEvent(BibleRequestEvent event);
	}

	public static class BibleRequestEvent extends Event<BibleRequestHandler> {

		private static final long serialVersionUID = -355399722460481173L;

		@Override
		public void dispatch(BibleRequestHandler handler) {
			handler.onBibleRequestEvent(this);
		}

	}

	public interface BibleAvailableHandler extends Handler {
		void onBibleAvailableEvent(BibleAvailableEvent event);
	}

	public static class BibleAvailableEvent extends
			DataEvent<List<TBible>, BibleAvailableHandler> {

		public BibleAvailableEvent(List<TBible> data) {
			super(data);
		}

		private static final long serialVersionUID = -6750281251689173472L;

		@Override
		public void dispatch(BibleAvailableHandler handler) {
			handler.onBibleAvailableEvent(this);	
		}

	}

}
